INCCPLEX= -I/opt/ibm/ILOG/CPLEX_Studio124/cplex/include/
LIBCPLEX= -L/opt/ibm/ILOG/CPLEX_Studio124/cplex/lib/x86_sles10_4.1/static_pic/ -lcplex -m32 -lm -pthread
CPLEXBIN=opt/ibm/ILOG/CPLEX_Studio124/cplex/bin/x86_sles10_4.1/

usage:
	@echo "USAGE"
	@echo "Pra compilar digite make exec"
	@echo "Pra limpar digite make clean"

bit:	
	g++ -c -Wall -O3 bitparalell/BitVector.cpp -o ../lib/bitvector.o
	
problem: bit tools	
	g++ -c -Wall -O3 problem/Solver.cpp -o ../lib/solver.o
	g++ -c -Wall -O3 problem/BrachAndBound.cpp -o ../lib/bb.o
	g++ -c -Wall -O3 problem/ColumnGeneration.cpp -o ../lib/col.o
	g++ -c -Wall -O3 problem/Enumeration.cpp -o ../lib/enum.o
	g++ -c -Wall -O3 $(INCCPLEX) problem/Formulation1.cpp -o ../lib/f1.o
	g++ -c -Wall -O3 $(INCCPLEX) problem/Formulation2.cpp -o ../lib/f2.o
	g++ -c -Wall -O3 $(INCCPLEX) problem/Formulation3.cpp -o ../lib/f3.o
	g++ -c -Wall -O3 problem/Heuristic.cpp -o ../lib/heur.o
	
reader:	
	g++ -c -Wall -O3 reader/Reader.cpp -o ../lib/read.o

tools: bit	
	g++ -c -Wall -O3 tools/Graph.cpp -o ../lib/graph.o
	g++ -c -Wall -O3 tools/Heap.cpp -o ../lib/heap.o
	g++ -c -Wall -O3 tools/Memory.cpp -o ../lib/mem.o
	g++ -c -Wall -O3 tools/Timer.cpp -o ../lib/time.o	
	
writer:	
	g++ -c -Wall -O3 writer/Writer.cpp -o ../lib/write.o
	
exec: bit problem reader tools writer 	
	g++ -Wall -O3 ../lib/bitvector.o ../lib/time.o sandbox/mainbit.cpp -o ../bin/sandboxbit
	g++ -Wall -O3 $(INCCPLEX) ../lib/bitvector.o ../lib/time.o ../lib/graph.o ../lib/heur.o ../lib/enum.o ../lib/solver.o ../lib/f1.o sandbox/maingraph.cpp -o ../bin/sandboxgraph $(LIBCPLEX)
	g++ -Wall -O3 $(INCCPLEX) ../lib/bitvector.o ../lib/time.o ../lib/graph.o ../lib/heur.o ../lib/enum.o ../lib/solver.o ../lib/f1.o main/main.cpp -o ../bin/ROMANDOMINATION $(LIBCPLEX)

clean:
	rm -f ../lib/*.o
	rm -f ../lib/*~